From 523c8eca448423b006b6ad7fa1a285efa552399f Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 26 Jan 2007 15:43:37 +0000 Subject: [PATCH] Use waypt_new in geo.c and then override the alt. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2634 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/geo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gpsbabel/geo.c b/gpsbabel/geo.c index c19706a96..9dbd84c9b 100644 --- a/gpsbabel/geo.c +++ b/gpsbabel/geo.c @@ -68,8 +68,14 @@ xg_tag_mapping loc_map[] = { void wpt_s(const char *args, const char **unused) { -// wpt_tmp = waypt_new(); - wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1); + wpt_tmp = waypt_new(); + /* + * 'geo' doesn't really have an 'unknown' and doesn't have any + * concept of alt. Unfortunately, we have many reference files + * that have leaked the 'unknown_alt' value into them, so we paper + * over that here. + */ + wpt_tmp->altitude = 0; } void wpt_e(const char *args, const char **unused) -- 2.30.2